import request from '@/utils/request'

export function fetchResearcherList() {
  return request({
    url: '/researchers',
    method: 'get'
  })
}

export function fetchResearcherById(id) {
  return request({
    url: `/researchers/${id}`,
    method: 'get'
  })
}

export function createResearcher(data) {
  return request({
    url: '/researchers',
    method: 'post',
    data
  })
}

export function updateResearcher(id, data) {
  return request({
    url: `/researchers/${id}`,
    method: 'put',
    data
  })
}

export function deleteResearcher(id) {
    return request({
      url: `/researchers/${id}`,
      method: 'delete'
    })
}
  
